/**
 * @file ai_communication_protocol.h
 * @brief Communication protocol for AI-human-computer interaction
 * @author AI Assistant
 * @date 2025-10-13
 */

#ifndef AI_COMMUNICATION_PROTOCOL_H
#define AI_COMMUNICATION_PROTOCOL_H

#include "stlstrings.h"
#include <map>
#include <vector>

enum class MessageType {
    COMMAND_TO_AI = 0,
    COMMAND_TO_COMPUTER,
    COMMAND_TO_HUMAN,
    DATA_REQUEST,
    DATA_RESPONSE,
    DATA_STREAM,
    STATUS_UPDATE,
    PROGRESS_REPORT,
    ERROR_MESSAGE,
    COMPLETION_NOTICE
};

enum class TerminalType {
    HUMAN_TO_AI = 0,
    AI_TO_COMPUTER,
    AI_TO_HUMAN,
    COMPUTER_TO_AI
};

enum class ContentType {
    TEXT = 0,
    CODE,
    FILE_PATH,
    COMMAND,
    QUESTION,
    CONFIRMATION,
    DATA_SET
};

struct AIMessage {
    MessageType msgType;
    TerminalType source;
    TerminalType destination;
    ContentType contentType;
    wxString content;
    std::map<wxString, wxString> metadata;
    wxString messageId;
    
    AIMessage() 
        : msgType(MessageType::COMMAND_TO_AI)
        , source(TerminalType::HUMAN_TO_AI)
        , destination(TerminalType::AI_TO_COMPUTER)
        , contentType(ContentType::TEXT)
    {}
    
    wxString ToString() const;
    static wxString TerminalToString(TerminalType terminal);
    static wxString MessageTypeToString(MessageType msgType);
};

#endif
